<template>
  <div class="container">
    <div v-for="(item, index) in list" :key="index" class="item">
      <div style="text-align:left">
        <p style="font-size:.3rem;font-weight:500">{{ item.cashStatus_ZH }}</p>
        <p>{{ item.createTime }}</p>
      </div>
      <div style="font-size:.44rem;font-weight:500;">- {{ item.amount }}</div>
    </div>
    <div class="no-data" v-if="!list.length">
      暂无数据
    </div>
  </div>
</template>
<script>
import { cashList } from '@/api';
export default {
  name: 'cashHistory',
  data() {
    return {
      list: []
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    getData() {
      cashList().then(res => {
        this.list = res.data.result;
      });
    }
  }
};
</script>
<style lang="less" scoped>
.container {
  padding: 0 0.15rem;
}
.item {
  display: flex;
  justify-content: space-between;
  align-content: center;
  font-size: 0.28rem;
  background: #fff;
  width: 100%;
  border-radius: 0.15rem;
  margin: 0.15rem 0;
  padding: 0.15rem;
}

.no-data {
  font-size: 0.3rem;
  color: #333;
  padding: 0.15rem;
}
</style>
